home *** CD-ROM | disk | FTP | other *** search
/ Chip 1998 September / CHIP NET Rehberi Eylül 1998.iso / tools / is30eval / IS30AENG / ISHARE.2 / NT40 / CLIENT / SYSTEM / OEMNSVIC.INF
INI File  |  1998-05-19  |  40KB  |  1,249 lines

  1. ;+---------------------------------------------------------------------------
  2. ;+ OEMNSVIC.INF
  3. ;+
  4. ;+ Client Service installation INF file prototype for i.Share
  5. ;+ Copyright (c) 1997 Artisoft, Inc.
  6. ;+---------------------------------------------------------------------------
  7.  
  8. [Identification]
  9.     OptionType = NetService
  10.  
  11. [Options]
  12.     ISCLI
  13.  
  14. [FileConstants]
  15.     UtilityInf                = "UTILITY.INF"
  16.     subroutineinf             = "SUBROUTN.INF"
  17.     Exit_Code                 = 0
  18.     NetEventDLL               = "%SystemRoot%\System32\netevent.dll"
  19.     IoLogMsgDLL               = "%SystemRoot%\System32\IoLogMsg.dll"
  20.     NetMsgDLL                 = "%SystemRoot%\System32\NetMsg.dll"
  21.     Kernel32DLL               = "%SystemRoot%\System32\Kernel32.dll"
  22.     Manufacturer              = "Artisoft"
  23.     ProductProviderName       = "iShare"
  24.     ProductMajorVersion       = "3"
  25.     ProductMinorVersion       = "0"
  26.     ProductVersion            = $(ProductMajorVersion)"."$(ProductMinorVersion)
  27.     ProductOpSupportISSRV  = 132 
  28.     ProductISCLIName         = "iShareServer"
  29.     ProductMSFTSoftKey        = $(!NTN_SoftwareBase)"\Microsoft\Windows\CurrentVersion"
  30.     ProductSoftKey            = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\"$(ProductProviderName)
  31.  
  32. ;   -------------------------------------------------------------------------
  33. ;   REGISTRY VALUES
  34. ;
  35. ;   Format of list:
  36. ;      {RegKey,SubKey,ValueName,DataType,Data,DeleteKeyOnRemove}
  37. ;
  38. ;      RegKey            - Open registry key.
  39. ;      SubKey            - Subkey under the open key.
  40. ;      ValueName         - Name of value under subkey.
  41. ;      DataType          - One of the defined types.
  42. ;      Data              - Data under valuename
  43. ;      DeleteKeyOnRemove - Boolean (1 or 0) flag to remove key on deletion.
  44. ;   -------------------------------------------------------------------------
  45.  
  46.  
  47.  
  48. ;   -------------------------------------------------------------------------
  49. ;   SERVICE AND COMPONENT LIST
  50. ;   -------------------------------------------------------------------------
  51.  
  52.  
  53.     ProductISSRVName          = "ISSRV"
  54.     ProductISSRVImagePath     = "\Program Files\Artisoft\Ishare\ISSRV.exe"
  55.     ProductISSRVSvcType       = "serviceauto"
  56.     ProductISSRVKey           = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\"$(ProductISSRVName)"\CurrentVersion"
  57.     ProductISSRVParamKey      = $(!NTN_ServiceBase)"\"$(ProductISSRVName)"\Parameters"
  58.     ProductISSRVSvcKey        = $(!NTN_ServiceBase)"\"$(ProductISSRVName)
  59.     ProductISSRVNetRuleKey    = $(ProductISSRVKey)"\NetRules"
  60.     ProductISSRVGrpDepend     = "NetBiosGroup"
  61.     ProductISSRVType          = "service"
  62.     ProductISSRVBindReview     = 1
  63.     NetRuleISSRVBindable      = {"iShareClient netBiosTransport non non 100",+
  64.                                  "iShareClient ipxTransport non non 100"}
  65.     NetRuleISSRVType          = "ISSRV iShareClient"
  66.     NetRuleISSRVClass         = {"iShareClient basic"}
  67.     NetRuleISSRVUse           = $(ProductISSRVType)" no no"
  68.     NetRuleISSRVBindForm      = """issrv"" yes yes container"
  69.  
  70. ;   -------------------------------------------------------------------------
  71. ;   SET THE COMPONENT AND SERVICE PIECES.
  72. ;
  73. ;   Form:
  74. ;      ComponentXXX
  75. ;      ServiceXXX
  76. ;
  77. ;   Comments:
  78. ;      A 'Service' is defined to be any driver run by the system.  A 
  79. ;      'Component' is a service that either (a) needs a binding or (b) needs
  80. ;      to have the name listed in the network property sheet.  In addition, 
  81. ;      the [InstallList] section needs to be filled with all Compoenent and
  82. ;      Service names.  
  83. ;   -------------------------------------------------------------------------
  84.  
  85. [InstallList]
  86.     ISCLI
  87.  
  88. ;   -------------------------------------------------------------------------
  89.  
  90. [ComponentISCLI]
  91.     ISSRV
  92.  
  93. [ServiceISCLI]
  94.  
  95. ;   -------------------------------------------------------------------------
  96. ;   -------------------------------------------------------------------------
  97.  
  98. [GeneralConstants]
  99.     from               = ""
  100.     to                 = ""
  101.     ExitCodeOk         = 0
  102.     ExitCodeCancel     = 1
  103.     ExitCodeFatal      = 2
  104.     KeyNull            = ""
  105.     MAXIMUM_ALLOWED    = 33554432
  106.     SERVICE_NO_CHANGE  = 4294967295
  107.     RegistryErrorIndex = NO_ERROR
  108.     KeyProduct         = ""
  109.     KeyParameters      = ""
  110.     TRUE               = 1
  111.     FALSE              = 0
  112.     NoTitle            = 0
  113.     ExitState          = "Active"
  114.     OldVersionExisted  = $(FALSE)
  115.     DriverPath         = $(!STF_NTPATH)\drivers
  116.  
  117. [SystemVars]
  118.     !STF_PROCESSOR      = "" ? $(!LIBHANDLE) GetProcessor
  119.     !STF_PLATFORM       = "" ? $(!LIBHANDLE) GetPlatform
  120.     !STF_WINDOWSPATH    = "" ? $(!LIBHANDLE) GetWindowsNtDir
  121.     !STF_NTPATH         = $(!STF_WINDOWSPATH)
  122.     !STF_WINDOWSSYSPATH = "" ? $(!LIBHANDLE) GetWindowsNtSysDir
  123.     !STF_COMPUTERNAME   = "" ? $(!LIBHANDLE) GetMyComputerName
  124.     !STF_USERNAME       = "" ? $(!LIBHANDLE) GetMyUserName
  125.     !STF_FLOPPYLIST     = {} ? $(!LIBHANDLE) GetFloppyDriveLetters
  126.     !STF_UNUSEDDRIVES   = {} ? $(!LIBHANDLE) GetUnusedDrives
  127.     !STF_LANGUAGE       = "" ? $(!LIBHANDLE) GetLanguage
  128.     !STF_BUSTYPE        = "" ? $(!LIBHANDLE) GetMyBusType
  129.     !STF_BUSTYPELIST    = "" ? $(!LIBHANDLE) GetMyBusTypeList
  130.     !NTN_SoftwareBase   = "Software"
  131.     !NTN_ServiceBase    = "System\CurrentControlSet\Services"
  132.     !NTN_ScUseRegistry  = "NO"
  133.  
  134. [date]
  135.     Now = {} ? $(!LIBHANDLE) GetSystemDate
  136.  
  137. [DetectSystemMemory]
  138.     SystemMemory    = "" ? $(!LIBHANDLE) GetMemorySize
  139.  
  140. [Identify]
  141.     read-syms Identification
  142.     set Status     = STATUS_SUCCESSFUL
  143.     set Identifier = $(OptionType)
  144.     set Media      = #("Source Media Descriptions", 1, 1)
  145.     Return $(Status) $(Identifier) $(Media)
  146.  
  147. [ReturnOptions]
  148.     set Status        = STATUS_FAILED
  149.     set OptionList     = {}
  150.     set OptionTextList = {}
  151.     set LanguageList = ^(LanguagesSupported, 1)
  152.     Ifcontains(i) $($0) in $(LanguageList)
  153.     goto returnoptions
  154.     else
  155.     set Status = STATUS_NOLANGUAGE
  156.     goto finish_ReturnOptions
  157.     endif
  158.  
  159. returnoptions = +
  160.     set OptionList     = ^(Options, 1)
  161.     set OptionTextList = ^(OptionsText$($0), 1)
  162.     set Status         = STATUS_SUCCESSFUL
  163.  
  164. finish_ReturnOptions = +
  165.     Return $(Status) $(OptionList) $(OptionTextList)
  166.  
  167. ; ---------------------------------------------------------------------------
  168. ; SHELL COMMANDS SECTION FOR AUTOMATED USE OF THIS INF FILE
  169. ; ---------------------------------------------------------------------------
  170.  
  171. [Shell Commands]
  172.     LoadLibrary "x" $(!STF_CWDDIR)setupdll.dll !LIBHANDLE
  173.     LoadLibrary "x" $(!STF_CWDDIR)ncpa.cpl !NCPA_HANDLE
  174.     ifstr(i) $(!LIBHANDLE) == ""
  175.        Debug-Output "OEMSETNT.INF: unable to load setupdll.dll"
  176.        set Exit_Code = STATUS_USERCANCEL
  177.        exit
  178.     endif
  179.     ifstr(i) $(!NCPA_HANDLE) == ""
  180.        Debug-Output "OEMSETNT.INF: unable to load ncpa.cpl"
  181.        set Exit_Code = STATUS_USERCANCEL
  182.        exit
  183.     endif
  184.     
  185.     read-syms SystemVars
  186.     detect    SystemVars
  187.  
  188. ;--DEBUG
  189. ;   Shell subroutn.inf, SetupMessage $(!STF_LANGUAGE) "STATUS" "NTN_InfSection: "$(!NTN_InfSection)
  190.  
  191.     Shell "" InstallOption $(!STF_LANGUAGE) $(!OEMNSVIC_OPTION) $(!STF_SRCDIR) "YES" "YES" "YES"
  192.     ifint $($ShellCode) != $( !SHELL_CODE_OK)
  193.        Debug-Output "OEMSETNT.INF: Failed to shell out to InstallOption"
  194.        Shell subroutn.inf, SetupMessage $(!STF_LANGUAGE) "STATUS" "Failed shell to InstallOption."
  195.        exit
  196.     endif
  197.     set Exit_Code = $($R0)
  198.     ifstr(i) $($R0) == STATUS_SUCCESSFUL
  199.        set Exit_Code = 1
  200.     endif
  201.     Debug-Output "OEMSETNT.INF: install returned "$($R0)
  202.  
  203.     FreeLibrary $(!LIBHANDLE)
  204.     FreeLibrary $(!NCPA_HANDLE)
  205.  
  206. ;--DEBUG    
  207. ;   Shell subroutn.inf, SetupMessage $(!STF_LANGUAGE) "STATUS" "Done."
  208.     
  209.     exit
  210.  
  211. ; ---------------------------------------------------------------------------
  212. ; ---------------------------------------------------------------------------
  213.  
  214. [InstallOption]
  215.     set Option   = $($1)
  216.     set SrcDir   = $($2)
  217.     set AddCopy  = $($3)
  218.     set DoCopy   = $($4)
  219.     set DoConfig = $($5)
  220.     set LanguageList = ^(LanguagesSupported, 1)
  221.     Ifcontains(i) $($0) NOT-IN $(LanguageList)
  222.     Return STATUS_NOLANGUAGE
  223.     endif
  224.  
  225.     Debug-Output "OEMSETNT.INF: STF_CWDDIR is: "$(!STF_CWDDIR)
  226.     Debug-Output "OEMSETNT.INF: STF_LANGUAGE is: "$(!STF_LANGUAGE)
  227.     set-subst LF = "\n"
  228.     read-syms GeneralConstants
  229.     read-syms FileConstants$(!STF_LANGUAGE)
  230.     read-syms FileConstants
  231.     read-syms DialogConstants$(!STF_LANGUAGE)
  232.     ifstr(i) $(!NTN_Origination) == "NCPA"
  233.     set Continue = $(OK)
  234.     endif
  235.     detect date
  236.     detect DetectSystemMemory
  237.     set-title  $(FunctionTitle)
  238.     set to   = Begin
  239.     set from = Begin
  240.     set CommonStatus = STATUS_SUCCESSFUL
  241.     
  242.     EndWait
  243.  
  244. Begin = +
  245.  
  246. ;   -------------------------------------------------------------------------
  247. ;   INSTALL CODE BEGINS
  248. ;   -------------------------------------------------------------------------
  249.  
  250. ;   Load the special-purpose DLL placed by InstallShield
  251.  
  252.     LoadLibrary "x" $(!STF_WINDOWSSYSPATH)\l4w32utl.dll !L4W32UTL_HANDLE
  253.     ifstr(i) $(!L4W32UTL_HANDLE) == ""
  254.         Debug-Output "OEMSETNT.INF: unable to load l4w32utl.dll"
  255.         set Exit_Code = STATUS_USERCANCEL
  256.         exit
  257.     endif
  258.  
  259.  
  260. ;   Set the global install lists that cover both components and services.
  261.  
  262.     ForListDo ^(InstallList,1)
  263.        Shell "" AppendList {+
  264.                 ^(Component$($),1),+
  265.                }
  266.        set !InstallList$($) = $($R0)
  267.     EndForListDo
  268.  
  269. ;   Set the install tasks based on the chosen option
  270.  
  271.     set DoISCLI  = FALSE
  272.  
  273. ;   Do the operations based on the !NTN_InstallMode when we came in.
  274.  
  275.     Ifstr(i) $(!NTN_InstallMode) == deinstall
  276.     ifstr(i) $(Option) == ISCLI
  277.        set DoISCLI  = TRUE
  278.     endif
  279.  
  280.     set OEM_ABANDON_OPTIONS = {}
  281.     ifstr(i) $(DoISCLI) == TRUE
  282.        ForListDo $(!InstallListISCLI) 
  283.           set OEM_ABANDON_OPTIONS = >($(OEM_ABANDON_OPTIONS),$(Product$($)Name))
  284.        EndForListDo
  285.     endif
  286.     set StartLabel = removeissrv
  287.     else-Ifstr(i) $(!NTN_InstallMode) == Update
  288.     set StartLabel = UpgradeSoftware
  289.     else-Ifstr(i) $(!NTN_InstallMode) == bind
  290.         set StartLabel = bindingadapter
  291.     else-Ifstr(i) $(!NTN_InstallMode) == configure
  292.     Shell $(UtilityInf),RegistryErrorString,CANNOT_CONFIGURE_SOFTWARE
  293.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  294.         Debug-Output "OEMSETNT.INF: ShellCode error: cannot get an error string."
  295.         goto ShellCodeError
  296.     endif
  297.     set Error = $($R0)
  298.     set from = end
  299.     set to = end
  300.     goto nonfatalinfo
  301.     else
  302.     ifstr(i) $(Option) == ISCLI
  303.        set DoISCLI  = TRUE
  304.     endif
  305.  
  306.     set StartLabel = installadapter
  307.     set OEM_ABANDON_OPTIONS = {}
  308.     endif
  309.  
  310.     set from = $(fatal)
  311.     set to = $(fatal)
  312.  
  313.     goto $(StartLabel)
  314.  
  315. installadapter = +
  316.  
  317. ;   -------------------------------------------------------------------------
  318. ;   FIRST SET ALL DEPENDENCIES AND INSTALLABLE OPTIONS
  319. ;   -------------------------------------------------------------------------
  320.  
  321.     set InstallOptionList = {}
  322.  
  323.  
  324.     ifstr(i) $(DoISCLI) == TRUE
  325.        Shell "" AppendList, {+
  326.                  $(InstallOptionList),+
  327.                  $(!InstallListISCLI)+
  328.                 }
  329.        set InstallOptionList = $($R0)
  330.     endif
  331.  
  332. ;   -------------------------------------------------------------------------
  333. ;   Make sure component is not already installed.  If it is, don't re-install
  334. ;   -------------------------------------------------------------------------
  335.  
  336.     ForListDo $(InstallOptionList)
  337.     OpenRegKey $(!REG_H_LOCAL) "" $(Product$($)SvcKey) $(MAXIMUM_ALLOWED) KeyProduct
  338.     Ifstr $(KeyProduct) != $(KeyNull)
  339.         ifcontains(i) $($) in $(!InstallListISCLI)
  340.         set DoISCLI  = FALSE
  341.         endif
  342.     endif
  343.     CloseRegKey $(KeyProduct)
  344.     EndForListDo
  345.     goto nextstep
  346.  
  347. nextstep = +
  348.     StartWait
  349.     Ifstr(i) $(!NTN_InstallMode) == install
  350.     Ifint $(OldVersionExisted) == $(FALSE)
  351.         goto installproduct
  352.     endif
  353.     endif
  354.     goto writeparameters
  355.  
  356. installproduct = +
  357.     Ifstr(i) $(DoCopy) == "YES"
  358.        
  359. ;      ----------------------------------------------------------------------
  360. ;      SET THE SOURCE DIRECTORIES FOR EACH COMPONENT AND SERVICE
  361. ;      ----------------------------------------------------------------------
  362.  
  363.        ifstr(i) $(DoISCLI) == TRUE
  364.       Shell "" SetDefaultSrcDir $(!REG_H_LOCAL) $(ProductSoftKey) "InstallDirectory"
  365.       Shell $(UtilityInf), DoAskSource, $(!STF_CWDDIR), $(SrcDir) YES
  366.       Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  367.           Goto ShellCodeError
  368.       Else-Ifstr(i) $($R0) == STATUS_FAILED
  369.           Shell $(UtilityInf) RegistryErrorString "ASK_SOURCE_FAIL"
  370.           ifint $($ShellCode) != $(!SHELL_CODE_OK)
  371.           goto ShellCodeError
  372.           endif
  373.           set Error = $($R0)
  374.           Goto fatal
  375.       Else-Ifstr(i) $($R0) == STATUS_USERCANCEL
  376.           Goto successful
  377.       Endif
  378.       set SrcDirISSRV = $($R1)
  379.        endif
  380.        
  381.     Endif
  382.  
  383.     install "Install-Option"
  384.     ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  385.        Shell $(UtilityInf) RegistryErrorString "UNABLE_COPY_FILE"
  386.        ifint $($ShellCode) != $(!SHELL_CODE_OK)
  387.        goto ShellCodeError
  388.        endif
  389.        set Error = $($R0)
  390.        goto fatal
  391.     endif
  392.  
  393.     set OEM_ABANDON_ON  = TRUE
  394.  
  395.  
  396. ;   -------------------------------------------------------------------------
  397. ;   FIRST INSTALL THE SOFTWARE COMPONENT(S)
  398. ;   -------------------------------------------------------------------------
  399.  
  400.  
  401.     Debug-Output "OEMSETNT.INF: Install Workstation in registry."
  402.  
  403.     set TempOptionList = {}
  404.  
  405.     ifstr(i) $(DoISCLI) == TRUE
  406.        Shell "" AppendList {$(TempOptionList) ^(ComponentISCLI,1)}
  407.        set TempOptionList = $($R0)
  408.     endif
  409.  
  410.     ForListDo $(TempOptionList)
  411.  
  412.     set ProductName        = $(Product$($)Name)
  413.     set ProductDisplayName = $(Product$($)DisplayName)
  414.     set ProductImagePath   = $(Product$($)ImagePath)
  415.     set ProductGroup       = $(Product$($)Group)
  416.     set ProductDepend      = $(Product$($)Depend)
  417.     set ProductTitle       = $(Product$($)Title)
  418.     set ProductDescription = $(Product$($)Description)
  419.     set ProductSvcType     = $(Product$($)SvcType)
  420.     set ProductGrpDepend   = $(Product$($)GrpDepend)
  421.     set ProductInteract    = $(Product$($)Interact)
  422.     set ProductType        = $(Product$($)Type)
  423.     set ProductBindReview  = $(Product$($)BindReview)
  424.     set ProductHidden      = $(Product$($)Hidden)
  425.     set NetRuleBindable    = $(NetRule$($)Bindable)
  426.     set NetRuleType        = $(NetRule$($)Type)
  427.     set NetRuleClass       = $(NetRule$($)Class)
  428.     set NetRuleUse         = $(NetRule$($)Use)
  429.     set NetRuleBindForm    = $(NetRule$($)BindForm)
  430.  
  431.     ifcontains(i) $($) in ^(ComponentISCLI,1)
  432.         set ProductOption = ISSRV
  433.     endif
  434.  
  435.     Set OEM_ABANDON_OPTIONS = >($(OEM_ABANDON_OPTIONS), $(ProductName))
  436.     Debug-Output "OEMSETNT.INF: Install "$(ProductName)" in registry."
  437.  
  438.  
  439. ;--DEBUG
  440. ;       Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "STATUS", "About to do "$($)
  441.  
  442.     Shell $(UtilityInf), AddSoftwareComponent, $(Manufacturer), +
  443.         $(ProductName), +
  444.         $(ProductName), +
  445.         $(ProductDisplayName), $(STF_CONTEXTINFNAME), +
  446.         $(ProductImagePath), $(ProductSvcType), $(ProductGroup), +
  447.         $(ProductDepend), "",+
  448.         $(NetEventDLL)
  449.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  450.         Debug-Output "OEMSETNT.INF: ShellCode error"
  451.         goto ShellCodeError
  452.     endif
  453.  
  454.     set RegistryErrorIndex = $($R0)
  455.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  456.         EndWait
  457.         Debug-Output "OEMSETNT.INF: Registry error: add software components"
  458.         CloseRegKey $($R1)
  459.         CloseRegKey $($R2)
  460.         CloseRegKey $($R3)
  461.         CloseRegKey $($R4)
  462.         CloseRegKey $($R5)
  463.         goto fatalregistry
  464.     endif
  465.    
  466.     Set SoftProductKey      = $($R1)
  467.     Set SoftNetRuleKey      = $($R2)
  468.     Set SoftServiceKey      = $($R3)
  469.     Set SoftParameterKey    = $($R4)
  470.     Set SoftLinkageKey      = $($R5)
  471.  
  472. ;       ------------------------------------------------------------------
  473. ;       SET THE SERVICE INTERACTIVE FLAG IF NECESSARY
  474. ;       ------------------------------------------------------------------
  475.  
  476.  
  477.     set NewValueList = {+
  478.                 {SoftwareType,$(NoTitle),$(!REG_VT_SZ),$(ProductType)},+
  479.                 {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMajorVersion)},+
  480.                 {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMinorVersion)},+
  481.                 {Title,$(NoTitle),$(!REG_VT_SZ),$(ProductTitle)},+
  482.                 {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductDescription)},+
  483.                 {ServiceName,$(NoTitle),$(!REG_VT_SZ),$(ProductName)},+
  484.                 {hidden,$(NoTitle),$(!REG_VT_DWORD),$(ProductHidden)},+
  485.                 {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)},+
  486.                 {Review,$(NoTitle),$(!REG_VT_DWORD),$(ProductBindReview)}+
  487.                }
  488.  
  489. ;--DEBUG
  490. ;       Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "STATUS", "Made it past AddSoftwareComponent."
  491.  
  492.     Shell  $(UtilityInf), AddValueList, $(SoftProductKey), $(NewValueList)
  493.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  494.         Debug-Output "OEMSETNT.INF: ShellCode error."
  495.         goto ShellCodeError
  496.     endif
  497.     set RegistryErrorIndex = $($R0)
  498.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  499.         EndWait
  500.         Debug-Output "OEMSETNT.INF: registry error: add value list."
  501.         CloseRegKey $(SoftProductKey)
  502.         CloseRegKey $(SoftNetRuleKey)
  503.         CloseRegKey $(SoftServiceKey)
  504.         CloseRegKey $(SoftLinkageKey)
  505.         CloseRegKey $(SoftParameterKey)
  506.         goto fatalregistry
  507.     endif
  508.  
  509.     set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleType)},+
  510.                 {bindable,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleBindable)},+
  511.                 {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleClass)}, +
  512.                 {use,$(NoTitle),$(!REG_VT_SZ),$(NetRuleUse)}, +
  513.                 {bindform,$(NoTitle),$(!REG_VT_SZ),$(NetRuleBindForm)}, +
  514.                 {InfOption,$(NoTitle),$(!REG_VT_SZ),$(ProductOption)}}
  515.  
  516. ;--DEBUG
  517. ;       Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "STATUS", "Made it past first ValueList."
  518.  
  519.     Shell  $(UtilityInf), AddValueList, $(SoftNetRuleKey), $(NewValueList)
  520.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  521.         Debug-Output "OEMSETNT.INF: ShellCode error."
  522.         goto ShellCodeError
  523.     endif
  524.  
  525.     SetRegValue $(SoftServiceKey) {Type,$(NoTitle),$(!REG_VT_DWORD), 272}
  526.  
  527.     set NewValueList = {{"DependOnGroup",$(NoTitle),$(!REG_VT_MULTI_SZ),$(ProductGrpDepend)}}
  528.     Shell $(UtilityInf), AddValueList, $(SoftServiceKey), $(NewValueList)
  529.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  530.         Debug-Output "OEMSETNT.INF: ShellCode error."
  531.         goto ShellCodeError
  532.     endif
  533.  
  534.     set NewValueList = {{OtherDependencies,$(NoTitle),$(!REG_VT_MULTI_SZ),$(ProductDepend)}}
  535.     Shell $(UtilityInf), AddValueList, $(SoftLinkageKey), $(NewValueList)
  536.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  537.         Debug-Output "OEMSETNT.INF: ShellCode error."
  538.         goto ShellCodeError
  539.     endif
  540.  
  541.     set RegistryErrorIndex = $($R0)
  542.     CloseRegKey $(SoftProductKey)
  543.     CloseRegKey $(SoftNetRuleKey)
  544.     CloseRegKey $(SoftServiceKey)
  545.     CloseRegKey $(SoftParameterKey)
  546.     CloseRegKey $(SoftLinkageKey)
  547.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  548.         EndWait
  549.         Debug-Output "OEMSETNT.INF: Registry error: add value list."
  550.         goto fatalregistry
  551.     endif
  552.  
  553. ;--DEBUG
  554. ;       Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "STATUS", "Made it second ValueList."
  555.  
  556.     EndForListDo
  557.  
  558. ;   -------------------------------------------------------------------------
  559. ;   -------------------------------------------------------------------------
  560.  
  561.     Goto writeparameters
  562.  
  563. writeparameters = +
  564.     goto successful
  565.  
  566. bindingadapter =+
  567.     ForListDo ^(InstallList,1)
  568.  
  569.         ForListDo $(!InstallList$($))
  570.  
  571.             set LinkageKey = $(Product$($)SvcKey)"\LINKAGE"
  572.             set ServiceName = $(Product$($)Name)
  573.  
  574. ;           -----------------------------------------------------------------
  575. ;           Only fix the service if the review value is set.
  576. ;           -----------------------------------------------------------------
  577.  
  578.             set ReviewKey = "SOFTWARE\Artisoft\"$(ServiceName)"\CurrentVersion"
  579.             OpenRegKey $(!REG_H_LOCAL) "" $(ReviewKey) $(MAXIMUM_ALLOWED) CS_ReviewKey
  580.             ifstr $(CS_ReviewKey) != ""
  581.                 GetRegValue $(CS_ReviewKey) "Review" ReviewInfo
  582.  
  583.                 ifint *($(ReviewInfo),4) != 0
  584.  
  585. ;                   ---------------------------------------------------------
  586. ;                   Open the linkage key
  587. ;                   ---------------------------------------------------------
  588.  
  589.                     OpenRegKey $(!REG_H_LOCAL) "" $(LinkageKey) $(MAXIMUM_ALLOWED) CS_TempKey
  590.                     ifstr $(CS_TempKey) != ""
  591.                         GetRegValue $(CS_TempKey) "Bind" BindInfo
  592.  
  593.  
  594.  
  595.  
  596. ;                       ---------------------------------------------------------
  597. ;                       Check bindings again if from setup and not from NCPA.
  598. ;                       ---------------------------------------------------------
  599.  
  600.                         set ISSetupKey = "SOFTWARE\Artisoft\IShare"
  601.                         OpenRegKey $(!REG_H_LOCAL) "" $(ISSetupKey) $(MAXIMUM_ALLOWED) CS_ISSetupKey
  602.                         ifstr $(CS_ISSetupKey) != ""
  603.                             GetRegValue $(CS_ISSetupKey) "Setup" SetupInfo
  604.  
  605.                             ifint *($(SetupInfo),4) != 0
  606.  
  607.     
  608.                                 GetRegValue $(CS_ISSetupKey) "Bind" ISBind
  609.                                 GetRegValue $(CS_TempKey) "Bind" BindInfo
  610.  
  611.  
  612. ;                              -----------------------------------------------------
  613. ;                              For each item bound, disable anything we don't like.
  614. ;                              -----------------------------------------------------
  615.     
  616.                                  ForListDo *($(BindInfo),4)
  617.                                     LibraryProcedure Result, $(!L4W32UTL_HANDLE) StrStr $($) *($(ISBind),4)
  618.                                     ifint $(Result) == 0
  619.                                         GetRegValue $(CS_TempKey) "Bind" CurrentBindInfo
  620.                                         set CurrentBindList = *($(CurrentBindInfo),4)
  621.                                         Shell "", GetListIndex $(CurrentBindList) $($)
  622.                                         ifint $($R0) != 0
  623.                                             Shell $(UtilityInf), ToggleBinding $(ServiceName) $($R0) "Disable"
  624.                                         endif
  625.                                     endif
  626.                                 EndForListDo
  627.                             endif
  628.                         endif
  629.                     
  630.                     endif
  631.  
  632. ;                   ---------------------------------------------------------
  633. ;                   Close the linkage key
  634. ;                   ---------------------------------------------------------
  635.  
  636.                     ifstr(i) $(CS_TempKey) != ""
  637.                         CloseRegKey $(CS_TempKey)
  638.                     endif
  639.  
  640.  
  641.                 endif
  642.  
  643.                 CloseRegKey $(CS_ReviewKey)
  644.                 CloseRegKey $(CS_SetupKey)
  645.  
  646.             endif
  647.     
  648.         EndForListDo
  649.  
  650.     EndForListDo        
  651.  
  652.     goto end
  653.  
  654. removeissrv = +
  655.  
  656.    
  657.     
  658.     Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), "ISSRV"
  659.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  660.        Debug-Output "OEMSETNT.INF: ShellCode error"
  661.        goto ShellCodeError
  662.     endif
  663.     set RegistryErrorIndex = $($R0)
  664.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  665.        goto fatalregistry
  666.     endif
  667.         
  668. ;    Shell $(UtilityInf), RemoveService, $($), "YES"
  669.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  670.         Debug-Output "OEMSETNT.INF: ShellCode error"
  671.         goto ShellCodeError
  672.     endif
  673.     
  674.     set RegistryErrorIndex = $($R0)
  675.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  676.        goto fatalregistry
  677.     endif
  678.  
  679.  
  680.     ifstr(i) $(DoISCLI) == TRUE
  681.  
  682. ;      ----------------------------------------------------------------------
  683. ;      DELETE REGISTRY KEYS
  684. ;      ----------------------------------------------------------------------
  685.  
  686.  
  687. ;       DeleteRegTree $(ProductISSRVSvcKey)
  688.  
  689. ;      ----------------------------------------------------------------------    
  690. ;      DELETE FILES
  691. ;      ----------------------------------------------------------------------
  692.  
  693.        set RemoveFilesList = ^(RemFiles-ISSRV, 1)
  694.  
  695.        ForListDo $(RemoveFilesList)
  696.        Set FullRemovePath = $(!STF_WINDOWSSYSPATH)$($)
  697.        LibraryProcedure Result, $(!LIBHANDLE), DelFile $(FullRemovePath)
  698.        EndForListDo
  699.  
  700.     endif
  701.  
  702.     goto end
  703.  
  704. UpgradeSoftware = +
  705.     set Error = "Upgrade: Sorry, not yet implemented."
  706.     goto fatal
  707.  
  708. successful = +
  709.     goto end
  710.  
  711. warning = +
  712.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "WARNING", $(Error)
  713.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  714.     goto ShellCodeError
  715.     endif
  716.     ifstr(i) $($R1) == "OK"
  717.     goto $(to)
  718.     else-ifstr(i) $($R1) == "CANCEL"
  719.     goto $(from)
  720.     else
  721.     goto end
  722.     endif
  723.  
  724. nonfatalinfo = +
  725.     Set CommonStatus = STATUS_USERCANCEL
  726.     Set Severity = STATUS
  727.     goto nonfatalmsg
  728.  
  729. nonfatal = +
  730.     Set Severity = NONFATAL
  731.     goto nonfatalmsg
  732.  
  733. nonfatalmsg = +
  734.     ifstr(i) $(Error) == ""
  735.     Set Severity = NONFATAL
  736.     Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  737.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  738.         goto ShellCodeError
  739.     endif
  740.     set Error = $($R0)
  741.     endif
  742.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), $(Severity), $(Error)
  743.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  744.     goto ShellCodeError
  745.     endif
  746.     ifstr(i) $($R1) == "OK"
  747.     goto $(from)
  748.     else
  749.     goto "end"
  750.     endif
  751.  
  752. fatalregistry = +
  753.     Shell $(UtilityInf) RegistryErrorString $(RegistryErrorIndex)
  754.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  755.     goto ShellCodeError
  756.     endif
  757.     set Error = $($R0)
  758.     goto fatal
  759.  
  760. fatal = +
  761.     ifstr(i) $(Error) == ""
  762.     Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  763.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  764.         goto ShellCodeError
  765.     endif
  766.     set Error = $($R0)
  767.     endif
  768.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "FATAL", $(Error)
  769.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  770.     goto ShellCodeError
  771.     endif
  772.     goto setfailed
  773.  
  774. ShellCodeError = +
  775.     set DlgType      = "MessageBox"
  776.     set STF_MB_TITLE = $(ShellCodeErrorTitle)
  777.     set STF_MB_TEXT  = $(ShellCodeErrorText)
  778.     set STF_MB_TYPE  = 1
  779.     set STF_MB_ICON  = 3
  780.     set STF_MB_DEF   = 1
  781.     ui start "Error Message"
  782.     goto setfailed
  783.  
  784. setfailed = +
  785.     set CommonStatus = STATUS_FAILED
  786.     Ifint $(RegistryErrorIndex) == CANT_REMOVE_WKSTA_NTAS
  787.     set CommonStatus = STATUS_USERCANCEL
  788.     endif
  789.     ifstr(i) $(OEM_ABANDON_ON) == TRUE
  790.     set OEM_ABANDON_ON = FALSE
  791.     goto removeissrv
  792.     endif
  793.     goto end
  794.  
  795. end = +
  796.     FreeLibrary $(!L4W32UTL_HANDLE)
  797.     goto term
  798.  
  799. term = +
  800.     Return $(CommonStatus)
  801.  
  802. [Install-Option]
  803.     set STF_VITAL = ""
  804.     ifstr(i) $(AddCopy) == "YES"
  805.     ifstr(i) $(DoISCLI) == TRUE
  806.        AddSectionFilesToCopyList Files-ISSRV $(SrcDirISSRV) $(!STF_WINDOWSSYSPATH)
  807.     endif
  808.     endif
  809.     ifstr(i) $(DoCopy) == "YES"
  810.        set !STF_NCPA_FLUSH_COPYLIST = TRUE
  811.        CopyFilesInCopyList
  812.     endif
  813.     ifstr(i) $(DoConfig) == "YES"
  814.     endif
  815.     Exit
  816.  
  817. [Install-Update]
  818.    set STF_VITAL        = ""
  819.    set STF_OVERWRITE    = "VERIFYSOURCEOLDER"
  820.    ifstr(i) $(DoISCLI) == TRUE
  821.       AddSectionFilesToCopyList Files-ISSRV $(SrcDirISSRV) $(!STF_WINDOWSSYSPATH)
  822.    endif
  823.    Exit
  824.  
  825. [Source Media Descriptions]
  826.     1 = "i.Share Install Disk-1",TAGFILE = disk1
  827.  
  828. [Signature]
  829.     FileType = MICROSOFT_FILE
  830.  
  831. [GetSignature]
  832.     read-syms Signature
  833.     return $(FileType)
  834.  
  835. [ProductType]
  836.     STF_PRODUCT  = Winnt
  837.     STF_PLATFORM = I386
  838.  
  839. ;   -------------------------------------------------------------------------
  840. ;   -------------------------------------------------------------------------
  841.  
  842. [Files-ISSRV]
  843. ;    1,ISSRV.EXE,SIZE=500000
  844.  
  845. [RemFiles-ISSRV]
  846. ;        ISSRV.EXE
  847.  
  848.  
  849. ; END OF MAIN SECTION
  850.  
  851.  
  852.  
  853. ; ---------------------------------------------------------------------------
  854. ; SetDefaultSrcDir
  855. ;
  856. ; Description:
  857. ;   Finds a source directory in the given registry key.
  858. ;
  859. ; Usage:
  860. ;   Shell "" SetDefaultSrcDir $(OpenKeyHandle) $(KeyName) $(ValueName) $(ExtraPath)
  861. ; ---------------------------------------------------------------------------
  862.  
  863. [SetDefaultSrcDir]
  864.     set KeyHandle = $($0)
  865.     set KeyName   = $($1)
  866.     set ValueName = $($2)
  867.     set ExtraPath = $($3)
  868.  
  869.     read-syms GeneralConstants
  870.     read-syms FileConstants$(!STF_LANGUAGE)
  871.     read-syms FileConstants
  872.     read-syms DialogConstants$(!STF_LANGUAGE)
  873.  
  874.     set !STF_SRCDIR_OVERRIDE = ""
  875.     OpenRegKey $(KeyHandle) "" $(KeyName) $(MAXIMUM_ALLOWED) CS_KeyHandle
  876.     ifstr $(CS_KeyHandle) != ""
  877.        GetRegValue $(CS_KeyHandle) $(ValueName) ValueList
  878.        set ValueType = *($(ValueList),3)
  879.        ifstr(i) $(ValueType) == $(!REG_VT_SZ)
  880.       set !STF_SRCDIR_OVERRIDE = *($(ValueList),4)
  881.        endif  
  882.     endif
  883.     CloseRegKey $(CS_KeyHandle)
  884.     ifstr(i) $(!STF_SRCDIR_OVERRIDE) != ""
  885.        ifstr(i) $(ExtraPath) != ""
  886.       set !STF_SRCDIR_OVERRIDE = $(!STF_SRCDIR_OVERRIDE)"\"$(ExtraPath)
  887.        endif
  888.     endif
  889.    
  890. SetDefaultSrcDir_RETURN =+
  891.     return
  892.  
  893. ; ---------------------------------------------------------------------------
  894. ; SHELL SUBROUTINES
  895. ; ---------------------------------------------------------------------------
  896.  
  897. ; ---------------------------------------------------------------------------
  898. ; AppendList
  899. ;
  900. ; Description:
  901. ;   Appends List2 to List1
  902. ;
  903. ; Usage:
  904. ;   Shell "" AppendList {$(List1), $(List2), ... , $(ListN)}
  905. ; ---------------------------------------------------------------------------
  906.  
  907. [AppendList]
  908.     set ListOfLists = $($0)
  909.  
  910.     set NewList = {}
  911.     ForListDo $(ListOfLists)
  912.        set CurrentList = $($)
  913.        ForListDo $(CurrentList)
  914.       set NewList = >($(NewList),$($))
  915.        EndForListDo
  916.     EndForListDo
  917.  
  918. AppendList_RETURN =+
  919.     return $(NewList)
  920.  
  921. ; ---------------------------------------------------------------------------
  922. ; WriteKeyValueSection
  923. ;
  924. ; Usage:
  925. ;   Shell "" WriteKeyValueSection $(ProductRegKeys)
  926. ; ---------------------------------------------------------------------------
  927.  
  928. [WriteKeyValueSection]
  929.     set RegKeyList = $($0)
  930.  
  931.     read-syms GeneralConstants
  932.     read-syms FileConstants$(!STF_LANGUAGE)
  933.     read-syms FileConstants
  934.     read-syms DialogConstants$(!STF_LANGUAGE)
  935.  
  936.     ForListDo $(RegKeyList)
  937.        set KeyHandle = *($($),1)
  938.        set KeyName   = *($($),2)
  939.        set ValueName = *($($),3)
  940.        set ValueType = *($($),4)
  941.        set ValueData = *($($),5)
  942.  
  943.        Shell "", WriteKeyValue $(KeyHandle) $(KeyName) $(ValueName) $(ValueType) $(ValueData)
  944.        set RegistryErrorIndex = $($R0)
  945.        Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  946.       goto WriteKeyValueSection_RETURN
  947.        endif
  948.     EndForListDo
  949.  
  950. WriteKeyValueSection_RETURN =+
  951.     return $(RegistryErrorIndex)
  952.     
  953. ; ---------------------------------------------------------------------------
  954. ; WriteKeyValue
  955. ;
  956. ; Usage:
  957. ;   Shell "" WriteKeyValue $(KeyHandle) +
  958. ;                          $(KeyName)   +
  959. ;                          $(ValueName) +
  960. ;                          $(ValueType) +
  961. ;                          $(ValueData)
  962. ; ---------------------------------------------------------------------------
  963.  
  964. [WriteKeyValue]
  965.     set KeyHandle = $($0)
  966.     set KeyName   = $($1)
  967.     set ValueName = $($2)
  968.     set ValueType = $($3)
  969.     set ValueData = $($4)
  970.     set RegistryErrorIndex = NO_ERROR
  971.  
  972.     read-syms GeneralConstants
  973.     read-syms FileConstants$(!STF_LANGUAGE)
  974.     read-syms FileConstants
  975.     read-syms DialogConstants$(!STF_LANGUAGE)
  976.  
  977.     Shell "" CreateOrOpenKey $(KeyHandle) $(KeyName)
  978.     set RegistryErrorIndex = $($R0)
  979.     set CS_KeyHandle       = $($R1)
  980.     Ifstr $(RegistryErrorIndex) != NO_ERROR
  981.        goto WriteKeyValue_RETURN
  982.     endif
  983.  
  984.     SetRegValue $(CS_KeyHandle) {$(ValueName),$(NoTitle),$(ValueType),$(ValueData)}
  985.     CloseRegKey $(CS_KeyHandle)
  986.  
  987. WriteKeyValue_RETURN =+
  988.     return $(RegistryErrorIndex)
  989.  
  990. ; ---------------------------------------------------------------------------
  991. ; DeleteKeyValueSection
  992. ;
  993. ; Usage:
  994. ;   Shell "" DeleteKeyValueSection $(ProductRegKeys)
  995. ; ---------------------------------------------------------------------------
  996.  
  997. [DeleteKeyValueSection]
  998.     set RegKeyList = $($0)
  999.     set RegistryErrorIndex = NO_ERROR
  1000.  
  1001.     read-syms GeneralConstants
  1002.     read-syms FileConstants$(!STF_LANGUAGE)
  1003.     read-syms FileConstants
  1004.     read-syms DialogConstants$(!STF_LANGUAGE)
  1005.  
  1006.     ForListDo $(RegKeyList)
  1007.        set KeyHandle     = *($($),1)
  1008.        set KeyName       = *($($),2)
  1009.        set ValueName     = *($($),3)
  1010.        set DeleteKeyFlag = *($($),6)
  1011.  
  1012.        ifint $(DeleteKeyFlag) == 0
  1013.        Shell "", DeleteKeyValue $(KeyHandle) $(KeyName) $(ValueName)
  1014.        set RegistryError = $($R0)
  1015.        Ifstr(i) $(RegistryError) != NO_ERROR
  1016.            ifstr(i) $(RegistryErrorIndex) == NO_ERROR
  1017.            set RegistryErrorIndex = $(RegistryError)
  1018.            endif
  1019.        endif
  1020.        else
  1021.        DeleteRegTree $(KeyHandle) $(KeyName)
  1022.        Ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
  1023.            ifstr(i) $(RegistryErrorIndex) == NO_ERROR
  1024.            set RegistryErrorIndex = $(ShellCodeErrorText)
  1025.            endif
  1026.        endif
  1027.        endif
  1028.     EndForListDo
  1029.  
  1030. DeleteKeyValueSection_RETURN =+
  1031.     return $(RegistryErrorIndex)
  1032.     
  1033. ; ---------------------------------------------------------------------------
  1034. ; DeleteKeyValue
  1035. ;
  1036. ; Usage:
  1037. ;   Shell "" WriteKeyValue $(KeyHandle) +
  1038. ;                          $(KeyName)   +
  1039. ;                          $(ValueName)
  1040. ; ---------------------------------------------------------------------------
  1041.  
  1042. [DeleteKeyValue]
  1043.     set KeyHandle          = $($0)
  1044.     set KeyName            = $($1)
  1045.     set ValueName          = $($2)
  1046.     set RegistryErrorIndex = NO_ERROR
  1047.     set CS_KeyHandle       = ""
  1048.  
  1049.     read-syms GeneralConstants
  1050.     read-syms FileConstants$(!STF_LANGUAGE)
  1051.     read-syms FileConstants
  1052.     read-syms DialogConstants$(!STF_LANGUAGE)
  1053.  
  1054.     OpenRegKey $(KeyHandle) "" $(KeyName) $(MAXIMUM_ALLOWED) CS_KeyHandle
  1055.     Ifstr $(CS_KeyHandle) == ""
  1056.     set RegistryErrorIndex = $(ShellCodeErrorText)
  1057.     goto DeleteKeyValue_RETURN
  1058.     endif
  1059.  
  1060.     DeleteRegValue $(CS_KeyHandle) $(ValueName)
  1061.     Ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
  1062.     set RegistryErrorIndex = $(ShellCodeErrorText)
  1063.     goto DeleteKeyValue_RETURN
  1064.     endif
  1065.  
  1066. DeleteKeyValue_RETURN =+
  1067.     CloseRegKey $(CS_KeyHandle)
  1068.     return $(RegistryErrorIndex)
  1069.  
  1070. ; ---------------------------------------------------------------------------
  1071. ; CreateOrOpenKey
  1072. ;
  1073. ; Description:
  1074. ;   Creates a new key or opens an existing one. 
  1075. ;
  1076. ; Usage:
  1077. ;   Shell "" CreateOrOpenKey $(OpenKeyHandle) $(NewKeyName)
  1078. ; ---------------------------------------------------------------------------
  1079.  
  1080. [CreateOrOpenKey]
  1081.     set KeyHandle = $($0)
  1082.     set KeyName   = $($1)
  1083.     set RegistryErrorIndex = NO_ERROR
  1084.  
  1085.     read-syms GeneralConstants
  1086.     read-syms FileConstants$(!STF_LANGUAGE)
  1087.     read-syms FileConstants
  1088.     read-syms DialogConstants$(!STF_LANGUAGE)
  1089.  
  1090.     CreateRegKey $(KeyHandle) {$(KeyName),$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" CS_KeyHandle
  1091.     ifstr $(CS_KeyHandle) == ""
  1092.     OpenRegKey $(KeyHandle) "" $(KeyName) $(MAXIMUM_ALLOWED) CS_KeyHandle
  1093.     endif
  1094.     Ifstr $(CS_KeyHandle) == ""
  1095.        set RegistryErrorIndex = $(ShellCodeErrorText)
  1096.        CloseRegKey $(CS_KeyHandle)
  1097.     endif
  1098.  
  1099. CreateOrOpenKey_RETURN =+
  1100.     return $(RegistryErrorIndex) $(CS_KeyHandle)
  1101.  
  1102. ; ---------------------------------------------------------------------------
  1103. ; SwapKeyValues
  1104. ;
  1105. ; Description:
  1106. ;   Takes two registry keys as arguments and effectively swaps the values for
  1107. ;   the given key.  Note that the key types MUST be the same, or an error
  1108. ;   will result.
  1109. ;
  1110. ; Usage:
  1111. ;   Shell "" SwapKeyValues {OpenKeyOne,Key1,Value1} {OpenKey2,Key2,Value2}
  1112. ; ---------------------------------------------------------------------------
  1113.  
  1114. [SwapKeyValues]
  1115.     set KeyList1 = $($0)
  1116.     set KeyList2 = $($1)
  1117.     set RegistryErrorIndex = NO_ERROR
  1118.  
  1119.     read-syms GeneralConstants
  1120.     read-syms FileConstants$(!STF_LANGUAGE)
  1121.     read-syms FileConstants
  1122.     read-syms DialogConstants$(!STF_LANGUAGE)
  1123.  
  1124.     Shell "" CreateOrOpenKey *($(KeyList1),1) *($(KeyList1),2)
  1125.     set RegistryErrorIndex = $($R0)
  1126.     set CS_KeyHandle1      = $($R1)
  1127.     Ifstr $(RegistryErrorIndex) != NO_ERROR
  1128.     goto SwapKeyValues_RETURN
  1129.     endif
  1130.  
  1131.     Shell "" CreateOrOpenKey *($(KeyList2),1) *($(KeyList2),2)
  1132.     set RegistryErrorIndex = $($R0)
  1133.     set CS_KeyHandle2      = $($R1)
  1134.     Ifstr $(RegistryErrorIndex) != NO_ERROR
  1135.     goto SwapKeyValues_RETURN
  1136.     endif
  1137.  
  1138.     GetRegValue $(CS_KeyHandle1) *($(KeyList1),3) ListData1
  1139.     set GetValueStatus1 = $(RegLastError)
  1140.  
  1141.     GetRegValue $(CS_KeyHandle2) *($(KeyList2),3) ListData2
  1142.     set GetValueStatus2 = $(RegLastError)
  1143.  
  1144.     ifint $(GetValueStatus1) != $(!REG_ERROR_SUCCESS)
  1145.     ifint $(GetValueStatus2) != $(!REG_ERROR_SUCCESS)
  1146.         set RegistryErrorIndex = $(ShellCodeErrorText)  
  1147.         goto SwapKeyValues_RETURN
  1148.     endif
  1149.     endif
  1150.  
  1151.     ifint $(GetValueStatus2) != $(!REG_ERROR_SUCCESS)
  1152.     DeleteRegValue $(CS_KeyHandle1) *($(KeyList1),3)
  1153.     else
  1154.     SetRegValue $(CS_KeyHandle1) $(ListData2)
  1155.     Ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
  1156.         set RegistryErrorIndex = $(ShellCodeErrorText)
  1157.         goto SwapKeyValues_RETURN
  1158.     endif
  1159.     endif
  1160.     
  1161.     ifint $(GetValueStatus1) != $(!REG_ERROR_SUCCESS)
  1162.     DeleteRegValue $(CS_KeyHandle2) *($(KeyList2),3)
  1163.     else
  1164.     SetRegValue $(CS_KeyHandle2) $(ListData1)
  1165.     Ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
  1166.         set RegistryErrorIndex = $(ShellCodeErrorText)
  1167.         goto SwapKeyValues_RETURN
  1168.     endif
  1169.     endif
  1170.  
  1171. SwapKeyValues_RETURN =+
  1172.     CloseRegKey $(CS_KeyHandle1)
  1173.     CloseRegKey $(CS_KeyHandle2)
  1174.     return $(RegistryErrorIndex)
  1175.  
  1176.  
  1177. ; ---------------------------------------------------------------------------
  1178. ; GetListIndex
  1179. ;
  1180. ; Purpose:
  1181. ;   Returns the index (beginning with 1) of the specified string.  A return
  1182. ;   of 0 signalls an error.
  1183. ; ---------------------------------------------------------------------------
  1184.  
  1185. [GetListIndex]
  1186.     set CheckList   = $($0)
  1187.     set FindString  = $($1)
  1188.     set ReturnIndex = 0
  1189.        
  1190.     read-syms GeneralConstants
  1191.     read-syms FileConstants$(!STF_LANGUAGE)
  1192.     read-syms FileConstants
  1193.     read-syms DialogConstants$(!STF_LANGUAGE)
  1194.  
  1195.     ForListDo $(CheckList)
  1196.     ifstr(i) $($) == $(FindString)
  1197.         ifint $(ReturnIndex) == 0
  1198.         set ReturnIndex = $(#)
  1199.         endif
  1200.     endif
  1201.     EndForListDo
  1202.  
  1203. GetListIndex_RETURN =+
  1204.     return $(ReturnIndex)
  1205.   
  1206.     
  1207. ; ---------------------------------------------------------------------------
  1208. ; LANGUAGE-SPECIFIC CONSTANTS
  1209. ; ---------------------------------------------------------------------------
  1210.  
  1211. [LanguagesSupported]
  1212.     ENG
  1213.  
  1214. [OptionsTextENG]
  1215.     ISCLI = "i.Share 3.0 Client"
  1216.  
  1217. [FileConstantsENG]
  1218.     ProCaption    = "i.Share 3.0 Client Setup"
  1219.     ProCancel     = "Cancel"
  1220.     ProCancelMsg  = "i.Share 3.0 Client is not correctly installed.  "+
  1221.             "Are you sure you want to cancel copying files?"
  1222.     ProCancelCap  = "i.Share Setup Message"
  1223.     ProText1      = "Copying:"
  1224.     ProText2      = "To:"
  1225.     FunctionTitle = "i.Share Client Setup"
  1226.  
  1227.     ProductISSRVDescription = "Artisoft i.Share Client gives you the ability to access shared Internet connections on the network"
  1228.  
  1229.     ProductISSRVDisplayName = "i.Share 3.0 Client"
  1230.  
  1231.     ProductISSRVTitle       = "i.Share 3.0 Client"
  1232.  
  1233.     ShellCodeErrorTitle        = "Error: "$(FunctionTitle)
  1234.     ShellCodeErrorText         = "Shell Code Error."
  1235.  
  1236. [DialogConstantsENG]
  1237.     Help                       = "&Help"
  1238.     Exit                       = "Cancel"
  1239.     OK                         = "OK"
  1240.     HelpContext                = ""
  1241.     Continue                   = "Continue"
  1242.     Cancel                     = "Cancel"
  1243.  
  1244. [FileDependentDlgENG]
  1245.  
  1246. ; ---------------------------------------------------------------------------
  1247. ; Copyright (C) 1997 Artisoft, Inc.
  1248. ; ---------------------------------------------------------------------------
  1249.